﻿
//Author: 张亚涛
//createtime:2016-02-28 14:29:44
//Description: 

using System;
using System.Data;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Model;
using DAL;

namespace BLL
{

    /// <summary>
    /// 该类提供了一系列操作 "MemberPay" 表的方法;
    /// </summary>
    public class MemberPayService
    {
        #region .对本表的维护.
        #region select data
        /// <summary>
        /// 返回MemberPay表的所有数据  
        /// </summary>
        /// <returns></returns>        
        public static List<MemberPay> GetAllMemberPay()
        {
            return MemberPayBase.GetAllMemberPay();
        }
        /// <summary>
        /// 根据MemberPay表的ID字段返回数据  
        /// </summary>
        /// <param name="id">ID</param>
        /// <returns></returns>        
        public static MemberPay GetMemberPayById(long id)
        {
            return MemberPayBase.GetMemberPayById(id);
        }
        /// <summary>
        /// 判断交易单号是否已存在
        /// </summary>
        /// <param name="TradeNo">交易单号</param>
        /// <returns>True表示存在，Flase表示不存在</returns>
        public static bool IsExistTradeNo(string tradeNo)
        {
            return MemberPayBase.IsExistTradeNo(tradeNo);
        }
        /// <summary>
        /// 获得返利明细
        /// </summary>
        /// <param name="month">月份</param>
        /// <returns></returns>
        public static DataTable GetRebateDetail(string month)
        {
            return MemberPayBase.GetRebateDetail(month);
        }
        /// <summary>
        /// 获得返利余额
        /// </summary>
        /// <param name="openID">微信号</param>
        /// <returns></returns>
        public static DataTable GetRebateBlance(string openID)
        {
            return MemberPayBase.GetRebateBlance(openID);
        }
        #endregion
        #region delete data
        /// <summary>
        /// 根据MemberPay表的ID字段删除数据 
        /// </summary>
        /// <param name="id">id</param>
        /// <returns>返回受影响的行数</returns>
        public static int DeleteMemberPayById(long id)
        {
            return MemberPayBase.DeleteMemberPayById(id);
        }
        #endregion
        #region update data
        /// <summary>
        /// 根据MemberPay表的ID字段更新数据 
        /// </summary>
        /// <param name="id">Id</param>
        /// <param name="MemberPay">memberPay</param>
        /// <returns>返回受影响的行数</returns>
        public static int UpdateMemberPayById(MemberPay memberPay)
        {
            return MemberPayBase.UpdateMemberPayById(memberPay);
        }
        #endregion
        #region insert data
        /// <summary>
        /// 向MemberPay表插入一条数据，插入成功则返回自增列数值，插入不成功则返回-1 
        /// </summary>
        /// <param name="memberPay">MemberPay</param>        
        /// <returns></returns>
        public static int AddMemberPay(MemberPay memberPay)
        {
            return MemberPayBase.AddMemberPay(memberPay);
        }
        #endregion
        #endregion

        #region .SQL语句汇总.
        /// <summary>
        /// 返回MemberPay表的所有数据（SQL语句） 
        /// </summary>
        /// <returns></returns>        
        public static string GetAllMemberPay_SQL()
        {
            return MemberPayBase.GetAllMemberPay_SQL();
        }
        #endregion
    }
}